﻿<Window x:Class="TaskFactoryBugSample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:taskFactoryBugSample="clr-namespace:TaskFactoryBugSample"
        Title="MainWindow"
        Height="350"
        Width="525" 
        mc:Ignorable="d"
        d:DataContext="{d:DesignInstance taskFactoryBugSample:MainWindowViewModel}">
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="*" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <Button Command="{Binding Refresh}"
            Content="Refresh"/>
    <TextBlock Grid.Row="1" 
               Text="{Binding CurrentMaster.Message}" />
    <ListBox Grid.Row="2"
             ItemsSource="{Binding Master}"
             DisplayMemberPath="Message"
             SelectedItem="{Binding CurrentMaster, Mode=TwoWay}"/>
    <TextBlock Grid.Row="3"
               Text="{Binding CurrentDetail.Message}" />
    <ListBox Grid.Row="4"
             ItemsSource="{Binding Detail}"
             DisplayMemberPath="Message"
             SelectedItem="{Binding CurrentDetail, Mode=TwoWay}"/>
  </Grid>
</Window>